Assigning Your Own Keybindings

xpat2 reads a keyboard definition file ( /usr/games/lib/xpat/keys by default), which you may customize. The structure of the file is easy: Every line contains a character (key), a space, and the name of the function to be assigned to this key. The valid function names are:
name description
None no operation
rq_LeavePat quit (confirmed)
rq_RestartGame restart (confirmed)
rq_AnotherGame another game (confirmed)
LeavePat quit (unconditionally)
RestartGame restart (unconditionally)
AnotherGame another game (unconditionally)
ResetHints reset the hint mechanism
DoHint execute the hint currently displayed
NextHint show the next hint
PreviousHint show the previous hint
CancelSelection abort a move
AllMoves do all obvious moves
UndoMove undo a move
RedoMove redo a move
DealCards deal cards, or flip the talon
ShowScore show current score
ReplayGame quick replay (gimmick only)
Layout recompute the window layout
SaveGame save current game
ShowVersion show version number of xpat2
MinWindow resize window to minimum size
PreferredWindow resize window to preferred size
Info more information on the game
ToStack move all or selected cards to the stacks
OneToStack move selected card to stack
AllToStack move all cards to the stacks
DropBookmark drop a bookmark
GotoBookmark go to bookmark
RotateUp rotate a slot up
RotateDown rotate a slot down
Cancel deny confirmation
Confirm confirm action
Three commands are available in a secure version (which pops up a confirm window), and an unconditional version. The confirm window is omitted, if a game is solved, or no move has been made yet. Actually, there is no need for the confirmed version of ``RestartGame'', since this move can be taken back by the undo command.

The ``MinWindow'' and ``Preferred Window'' commands are an experimental feature. They may require to be called twice, due to changes in the command button area, which are not precomputed. The ``MinWindow'' function resizes the other window of xpat2 to the size needed for the smallest layout. The ``Preferred Window'' function resizes the other window of xpat2 to the size needed for the current layout.